home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / board / Spades.lha / Spades / Spades.readme < prev    next >
Text File  |  1992-04-02  |  13KB  |  219 lines

  1. Spades Version 2.12, by Greg Stelmack, April 2, 1992.
  2.  
  3. *** NOTE: Address change near bottom from version 1.2 documentation ***
  4. *** ALSO NOTE: System Software 2.xx is now REQUIRED to run Spades   ***
  5.  
  6.      "Spades" is a program written to play the card game Spades. It may be
  7. run from the CLI or the Workbench. The files required to play are "Spades"
  8. and "Spades.images", and both must be in the same directory. NOTE: Spades
  9. now requires AmigaDOS 2.xx to run. This is because Spades is essentially
  10. a tool for me to learn Amiga programming (I have made only $5 off of it),
  11. and I am trying out some of the 2.xx stuff as I modify it.
  12.      This is a one player version of Spades -- you play one hand, and the
  13. computer plays your partner and two opponents. The program plays by the
  14. following rules adopted by my friends and I here at the University of South
  15. Florida:
  16.      1) Four players are found, divided into two partnerships of two
  17. players each. Partners sit opposite each other.
  18.      2) A dealer is randomly picked. Each player receives 13 cards from a
  19. standard 52-card deck dealt clockwise starting with the player on the
  20. dealer's left. On successive hands, the deal passes to the left.
  21.      3) Starting to the left of the dealer, each player bids the number of
  22. tricks he feels his hand can take. Bidding passes clockwise. A
  23. partnership's bid is the total of the two partners' bids. A partnership
  24. must take this total number of tricks.
  25.      4) Play starts with the player to the left of the dealer and passes
  26. clockwise. The only rule about leading is that spades may not be lead until
  27. spades have been broken (i.e., played during a hand), unless a player holds
  28. only spades.
  29.      5) Players must follow suit -- if you have a card of the suit lead,
  30. you must play it. Otherwise, any suit may be played. Play ends with the
  31. player to the right of the leader. In other words, each player plays one
  32. card.
  33.      6) Highest card of the suit lead, or highest spade if a spade has been
  34. played, wins the trick. Cards rank 2 lowest through Ace highest. The trick
  35. winner scores one trick for his partnership and then leads for the next
  36. trick.
  37.      7) After all 13 tricks in a hand have been taken, scores are totaled.
  38. If a partnership takes at least as many tricks as they bid, they get 10
  39. points for each trick they bid and one point for each trick they took over
  40. their bid. If a partnership fails to take the number of tricks they bid,
  41. they lose 10 points for each trick they bid. If NIL bids are in effect, and
  42. a player bid zero tricks and took zero, his side scores 100 points. If a
  43. player bid zero and took at least one trick, his side loses 100 points. If
  44. Bags are in effect, and a team has accumulated 10 or more overtricks, they
  45. lose 100 points. Negative scores are possible.
  46.      8) Deal passes to the left for another hand. First team to 500, or the
  47. team with the highest score if both cross 500, wins.
  48.  
  49.      When the program is first started, the computer will randomly deal out
  50. cards to each player until the Ace of Spades is dealt. This player becomes
  51. the dealer. The computer will then deal the cards. You will see your hand
  52. at the bottom of the screen. Your partner sits across from you (at the top
  53. of the screen), and your opponents are to either side of you. The computer
  54. players will bid automatically. Their bids will appear as numbers in front
  55. of the positions at which they are sitting.
  56.      When it is your turn to bid, a black bid box will appear in the lower
  57. right-hand corner of the screen. Use the left mouse button to select your
  58. bid. Clicking on the plus sign will raise your bid one trick. Clicking on
  59. the minus sign will lower your bid one trick. Clicking on OK will accept
  60. your bid. Selecting the Suggest option from the Game menu (or typing Right-
  61. Amiga-s on the keyboard) will cause the computer to suggest a bid for you.
  62.      After all bids have been entered, the computer will pause for you to
  63. examine the bids. When you are ready to play, click the left mouse button.
  64.      Cards will then be played. Cards played by a computer player will
  65. appear in the appropriate position on the screen. When it is your turn to
  66. play, the computer will prompt you. Simply point at the card you want to
  67. play and click the left mouse button. Again, selecting Suggest from the
  68. Game menu will cause the computer to suggest a card for you to play (it
  69. will mark it with an asterisk).
  70.      Note that the computer will not let you play an illegal card. If
  71. nothing happens when you click, you are either trying to lead spades before
  72. they have been broken or you are not following the lead suit when you can.
  73.      After all cards in the trick have been played, the computer will place
  74. an asterisk in front of the winning card and update the trick count. If
  75. this was also the last trick in the hand, it will update the scores. It
  76. will then pause for you to look at all the cards that were played. When you
  77. are ready to continue, click the left mouse button.
  78.      This cycle will continue until a winner is found. The program will
  79. then display a final score screen and ask whether or not you would like to
  80. play again. Clicking YES will cause the game to start over. Clicking NO
  81. will bring you back to the environment you started the game from. Note that
  82. the game may be quit at any time by selecting Quit from the Project menu.
  83.  
  84.      There are now several menus with the game. Under the Project menu,
  85. there are New Game (start a new game), Save Hand (more in a minute),
  86. Print Hand (not yet implemented), About (shows some information about
  87. myself), and Quit (exit the game). Under the Game menu, there are NIL Bids
  88. (toggles the NIL rule on and off -- the rule is in effect when checked),
  89. Bags (toggles the Bags rule on and off -- the rule is in effect when
  90. checked), and Suggest (suggest a bid or play as listed above). New options
  91. may be added here later.
  92.      The Save Hand menu option is a toggle. As long as it is checked, each
  93. hand will be appended to the file "Spades.save" in the current directory.
  94. This option has been added for two reasons: so you can review hands later,
  95. and so that you can send me this file with a hand you think the computer
  96. goofed up on. If you see a mistake, turn this option on, and then mail or
  97. E-Mail me a copy of that file, along with the play you feel the computer
  98. should have made and why. I will use this to help enhance the computer
  99. players. NOTE: If you leave this option on, the Spades.save file can get
  100. quite large. Remember to clean it up from time to time. Spades creates this
  101. file if it doesn't exist, so don't worry about keeping a copy around.
  102.  
  103. For Programmers:
  104.      The source code should be included with the program. The game is
  105. written in C and compiled using SAS/C 5.10b. I hope that anyone out there
  106. interested in designing their own card games will find this code useful.
  107. Note that the "Spades.images" file contains all the data necessary to draw
  108. the cards. The reader routine is in the procedure "OpenAll". Feel free to
  109. use any or all of the code or images in your own programs. The current
  110. version was compiled with the following command for each source file:
  111.      LC -ma -rr -O -cf -cs -E -Li -q10e -q10w -ms -N SourceFile.c
  112. and then all were linked together into the Spades executable (Well,
  113. actually I now use the Workbench interface, but this is the equivalent
  114. command line for the options I used...)
  115.      The program (as of version 2.10) has been broken up into several
  116. source files. Since I use the Workbench interface for SAS/C, I do not have
  117. a Makefile for it, but I have included the SASCOPTS file that I use for
  118. compiling.
  119.  
  120. Copyright Notice:
  121.      This program is copyright 1990 by Gregory M. Stelmack. However, I give
  122. permission for anyone to freely distribute this program as long as this
  123. file and the by-line in the title bar of the game remains, and they make no
  124. profit from its distribution (cost of media may be charged -- this is an
  125. implicit OK for Fred Fish to put Spades in his collection). Also, you may
  126. use any of the code for your own programs, but please remember to give
  127. credit where credit is due. I cannot be held responsible for damage that
  128. occurs as a result of the use/misuse of this program, but note that I have
  129. made every effort to make sure it will work properly.
  130.      If you find problems, useful enhancements, new rules I may want to
  131. include, or if you would like to send a donation (say 5 or 10 dollars) to
  132. cover my costs (computer, compiler, tools, education, etc.), my address is:
  133.                    Gregory M. Stelmack
  134.                    8723 Del Rey Ct. #11-A
  135.                    Tampa, FL 33617
  136. Feel free to send any comments or suggestions to the above address.
  137. E-mail to: stelmack@eggo.csee.usf.edu
  138. BBS: Simply Amazing! (813)977-3940 in Tampa: GREG STELMACK
  139.  
  140. VERSION CHANGES:
  141.  
  142. Changes 1.0 to 1.1:
  143.      Removed need for Spades.font. Card data is now stored in
  144. Spades.images, and this file is read in at run-time.
  145.      Added title graphics.
  146.      Added routine for choosing dealer.
  147.      First release version.
  148.  
  149. Changes 1.1 to 1.11:
  150.      Corrected a memory allocation and fragmentation bug. The program was
  151. only freeing a portion of its allocated memory. It now frees all of it.
  152. Thanks to Juan Orlandini for catching this.
  153.      Added a few prompts for mouse clicks where the program used to just
  154. pause.
  155.  
  156. Changes 1.11 to 1.12:
  157.      Changed the LIBRARY_VERSION in the OpenLibrary() calls to zero. This
  158. is an attempt to let the program run under pre-1.3 Workbench, but I make no
  159. guarantees.
  160.  
  161. Changes 1.12 to 1.20:
  162.      Some of the strategy and bidding routines have been slightly modified.
  163. Hopefully the computer plays a little better now, but there is room for a
  164. little more improvement. Maybe I'll have some time this Summer...
  165.      Added a HIDE gadget in the Window TitleBar. Allows Spades to move to
  166. the background so you can do something else if you get bored :).
  167.  
  168. Changes 1.20 to 2.00:
  169.      New images! Now the face cards and aces look like real face cards and
  170. aces :).
  171.      New user-interface. Menus have been added to support the optional
  172. rules (see below). Errors now bring up requestors, which allowed the
  173. removal of stdio. Unfortunately, I use EasyRequest() from V36 of the
  174. Intuition library, so you now need AmigaDOS 2.xx to use Spades :(. Window
  175. is now a backdrop window, and the screen's titlebar is visible, meaning
  176. the screen may be shoved to the back or dragged like any other Intuition
  177. screen.
  178.      The rules for NIL bids and Bags have been added. Brief explanation:
  179. bids allow you to bid zero, and if you take no tricks gain 100 points. If
  180. you take at least one trick, you lose 100 points. Bags refer to overtricks --
  181. if your team accumulates 10 overtricks over a series of hands, you lose 100
  182. points. Unfortunately, the computer players do not yet know about these
  183. new rules. They are, however, optional, so they may be turned on and off at
  184. will (the default is OFF).
  185.      Removed the title graphics (no real added value, and the executable is
  186. now MUCH smaller).
  187.  
  188. Changes 2.00 to 2.10:
  189.      Broke the source code up into several files to make room for future
  190. enhancements. Implemented the Save Hand menu option. More extensive use
  191. of System 2.0 features, including use of GadTools for Menu creation and
  192. layout. Improved the computer players to now take the optional rules into
  193. account.
  194.  
  195. Changes 2.10 to 2.11:
  196.      I stupidly called EasyRequest() to display every error message,
  197. including the one when Intuition can't be opened! I can't come up with a
  198. good way of doing this short of going back to standard I/O, or including
  199. lots of code for this one case, so for right now the program will just
  200. quietly closed if Intuition cannot be opened. This generally happens when
  201. Spades is run under 1.3, which it no longer will.
  202.  
  203. Changes 2.11 to 2.12:
  204.      If a game was started by selecting "New Game" from the menu, it was
  205. impossible to exit the game from the final screen. Selecting the "NO"
  206. button would just restart Spades. I still don't know why this happened
  207. (tracing seemed to show a random jump into my ReadMouse() routine), but
  208. I redid the logic (FinishRoutine() now directly calls WrapUp(), and the
  209. AllDone flag has been eliminated) and it works properly now.
  210.  
  211. FUTURE ENHANCEMENTS PLANNED (time permitting, of course):
  212.      Strategy: Computer still occasionally does something dumb, mostly
  213. because it has difficulty looking into the future and predicting who is out
  214. of what. I need to make it smarter. Also, it bids poorly (too low) with
  215. lots of Spades in its hand.
  216.      Options: Implement the Print Hand option (although you could just
  217. print the Spades.save file.
  218.      1.3 version: If enough people ask for it...
  219.